package java06;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

public class zy01 {
    public static void main(String[] args) {
        ArrayList<String> arr = new ArrayList<>();
        Collections.addAll(arr, "zhangsn,23", "lisi,24", "wangwu,25");

        Map<String, Integer> resultMap = arr.stream()
                .map(item -> item.split(","))
                .filter(parts -> Integer.parseInt(parts[1]) > 24)
                .collect(Collectors.toMap(parts -> parts[0], parts -> Integer.parseInt(parts[1])));

        System.out.println(resultMap);
    }
}

